test: #20 Playwright E2E journey and axe-core scans #81
+303
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #20.
What was done
e2e/workspace (@t19/e2e) with Playwright and@axe-core/playwright. Root scriptpnpm test:e2e; the base URL comes fromE2E_BASE_URL(defaulthttp://localhost:5173/project2/).pnpm testdoes not run it, so CI is unchanged.e2e/tests/search.spec.ts:ABBEYandabbeygive the same results.e2e/tests/a11y.spec.ts: axe-core scans (WCAG 2.1 A + AA) of the start page, results with filters open, empty results and the album detail page. Runs in a real browser, so colour contrast is included, unlike the jsdom tests.The tests expect the
db:seedcatalog. The VM's MusicBrainz catalog has no Abbey Road or Beatles, so do not point them at the deployed site.What was tested
db:seed, API, Vite), and pass again on a second run (the cleanup works)..mutedcolour fails all 4 axe tests withcolor-contrast, and renaming a sort option fails the journey.pnpm format:check,pnpm lint, typecheck andpnpm testpass.How to run